home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
BUG 1
/
BUGCD1996_0708.ISO
/
pc
/
util
/
minilin
/
minilin.exe
/
USR
/
X11.{__
/
BIN
/
STARTX
< prev
next >
Wrap
Text File
|
1993-10-20
|
2KB
|
94 lines
#!/bin/sh
# $XFree86: mit/clients/xinit/startx.cpp,v 2.0 1993/10/13 15:49:15 dawes Exp $
# $XConsortium: startx.cpp,v 1.4 91/08/22 11:41:29 rws Exp $
#
# This is just a sample implementation of a slightly less primitive
# interface than xinit. It looks for user .xinitrc and .xserverrc
# files, then system xinitrc and xserverrc files, else lets xinit choose
# its default. The system xinitrc should probably do things like check
# for .Xresources files and merge them in, startup up a window manager,
# and pop a clock and serveral xterms.
#
# Site administrators are STRONGLY urged to write nicer versions.
#
userclientrc=$HOME/.xinitrc
userserverrc=$HOME/.xserverrc
if [ x"$XWINHOME" != x ]; then
if [ x"$XWINHOME" = x/usr ]; then
BIN_DIR=/usr/bin/X11
else
BIN_DIR=$XWINHOME/bin
fi
XINIT_DIR=$XWINHOME/lib/X11/xinit
else
BIN_DIR=/usr/X386/bin
XINIT_DIR=/usr/X386/lib/X11/xinit
fi
sysclientrc=$XINIT_DIR/xinitrc
sysserverrc=$XINIT_DIR/xserverrc
clientargs=""
serverargs=""
if [ -f $userclientrc ]; then
clientargs=$userclientrc
else if [ -f $sysclientrc ]; then
clientargs=$sysclientrc
fi
fi
if [ -f $userserverrc ]; then
serverargs=$userserverrc
else if [ -f $sysserverrc ]; then
serverargs=$sysserverrc
fi
fi
whoseargs="client"
have_server=0
while [ "x$1" != "x" ]; do
case "$1" in
/''*|\.*) if [ "$whoseargs" = "client" ]; then
clientargs="$1"
else
serverargs="$1"
have_server=1
fi ;;
--) whoseargs="server" ;;
*) if [ "$whoseargs" = "client" ]; then
clientargs="$clientargs $1"
else
if [ "$have_server" = 0 ]; then
if [ -x $BIN_DIR/"$1" ]; then
serverargs=$BIN_DIR/"$1"
have_server=1
else
serverargs="$serverargs $1"
fi
else
serverargs="$serverargs $1"
fi
fi ;;
esac
shift
done
xinit $clientargs -- $serverargs